package repositories;

import java.util.Collection;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import domain.Pago;

@Repository
public interface PagoRepository extends JpaRepository<Pago, Integer> {

	@Query("select p from Pago p where p.comunidadDeVecinos.id=?1")
	Collection<Pago> findPagosByComunidadDeVecinos(int comunidadDeVecinosId);
	
}
